Skip to content

Add google_apigee_data_collector resource#16954

Open
ogormans-deptstack wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
ogormans-deptstack:feat/apigee-datacollector
Open

Add google_apigee_data_collector resource#16954
ogormans-deptstack wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
ogormans-deptstack:feat/apigee-datacollector

Conversation

@ogormans-deptstack
Copy link
Copy Markdown

Adds the google_apigee_data_collector resource to the Google provider, enabling Terraform management of Apigee DataCollectors for custom analytics and API monetization.

This is a rewrite of #11655, which was opened under the old Ruby generator format. As noted by @rileykarson in that PR, the generator has since moved to Go with generic YAML types. This PR follows the current conventions.

Resource Details

  • API: apigee.googleapis.com/v1/organizations/{org}/datacollectors
  • Operations: Create, Read, Update (PATCH with updateMask), Delete, Import
  • Fields:
    • org_id (required, immutable) - Apigee organization
    • data_collector_id (required, immutable) - Must begin with dc_, validated via regex
    • type (required, immutable) - Enum: INTEGER, FLOAT, STRING, BOOLEAN, DATETIME
    • description (optional, mutable) - Only updatable field
    • name, created_at, last_modified_at (computed, output-only)

Testing

Built the provider locally and tested all CRUD operations against a real Apigee eval organization:

Operation Result
Create 2 data collectors (INTEGER, STRING types) created successfully
Read No drift on re-plan
Update Description updated via PATCH
Import Full path format (organizations/{org}/datacollectors/{id}) works
Delete Clean destruction with correct dependency ordering

Files

  • mmv1/products/apigee/DataCollector.yaml - Resource definition
  • mmv1/templates/terraform/custom_import/apigee_data_collector.go.tmpl - Import logic for org-scoped resources
  • mmv1/templates/terraform/examples/apigee_data_collector_basic.tf.tmpl - Docs example
  • mmv1/templates/terraform/examples/apigee_data_collector_basic_test.tf.tmpl - Acceptance test example

Modeled on existing Apigee resources (AppGroup, Envgroup) for consistency.

`google_apigee_data_collector`

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Apr 4, 2026
@google-cla
Copy link
Copy Markdown

google-cla bot commented Apr 4, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 4, 2026

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@NickElliot, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@github-actions github-actions bot requested a review from NickElliot April 4, 2026 23:52
@ogormans-deptstack
Copy link
Copy Markdown
Author

I signed the CLA after the fact please rerun

@ogormans-deptstack
Copy link
Copy Markdown
Author

I signed the CLA after the fact please rerun

#16955 passed on my other contribution so we should be good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-approval Pull requests that need reviewer's approval to run presubmit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants